<?php
$this->breadcrumbs=array();

$this->sidebarTop = array(
    'label' => Yii::t('BackEnd', 'cm article'),
    'link' => Yii::app()->createUrl("/aCategory/admin/")
);

$this->moduleName = "ACategory";

$this->slidebar = Backend::getModuleSlideBar('CMS', '/aCategory/admin','Article');

$this->menu=array(
	array('label'=>Common::icon('delete'), 'itemOptions'=>array('style'=>'cursor:pointer', 'onclick'=>'Chienlv.deleteAll("form-admin", "/aCategory/delete");')),
	array('label'=>Common::icon('create'), 'url'=>array('create')),
);

$this->title = Common::icon('manager'). Yii::t('BackEnd',"acategory");
?>

<div class="search-form">
    <?php $this->renderPartial('_search',array(
        'model'=>$model,
    )); ?>
<?php Yii::app()->clientScript->registerScript('search', "
        $('.search-button').click(function(){
            $('.search-form').toggle();
            return false;
        });
        $('.search-form form').submit(function(){
            $.fn.yiiGridView.update('acategory-grid', {
                data: $(this).serialize()
            });
            return false;
        });
    ");?>
</div><!-- search-form -->

<?php echo CHtml::beginForm('#', 'post', array('id'=>'form-admin', 'name'=>'frmAdmin')); ?><input type="hidden" id="moduleName" value="ACategory"/>
<?php $this->widget('application.widgets.admin.GridView', array(
	'id'=>'acategory-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'id',
		'parent',
		'a_category_name',
		'url_key',
		'hits',
		'sorder',
		/*
		'status',
		*/
		array(
			'class'=>'CButtonColumn',
			'deleteConfirmation'=>Yii::t('BackEnd', 'Are you sure you want to delete this item?'),
		),
	),
)); ?>
<?php echo CHtml::endForm(); ?>